import Vue from 'vue'
import App from './App.vue'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import '@/assets/css/global.css'
import axios from 'axios' //安装axios:npm install axios
import moment from 'moment'

Vue.config.productionTip = false

Vue.use(ElementUI);
Vue.use(moment);

//路径前缀
axios.defaults.baseURL="/api";

//挂载axios(相当于声明了一个vue的全局变量,命名是this,$http就可以使用了)
Vue.prototype.$http = axios

new Vue({
  router,
  render: h => h(App)
}).$mount('#app')
